package com.ebelter.scalebledemo.util;

import java.io.File;
import java.io.FileFilter;

/**
 * 文件过滤器
 * Created by Sergio Pan on 2017/11/9.
 */

public class BtFileFilter implements FileFilter {

    private String matchStr;

    public BtFileFilter(String matchStr) {
        this.matchStr = matchStr;
    }

    @Override
    public boolean accept(File pathname) {
        if (pathname.getName().startsWith(matchStr)) {
            return true;
        }
        return false;
    }
}
